extends ../layout

append scripts
  script(type="text/javascript", src="/javascripts/jquery.qrcode.min.js")
  script.
    $(function () {
      //- var cardId = (window.location.href).split('/').pop();
      var cardId = '!{cid}';
      var url = window.location.href;
      if (/^localhost/.test(window.location.host)) {
        url = 'http://192.168.1.5:8080/v/' + cardId;
      } else {
        url = url.replace('card', 'v').replace('/share', '');
      }

      var size = 200;
      console.log(url);
      $('#qrcode').qrcode({
        width: size,
        height: size,
        text: url
      });
    });

block content
  .container
    .row.share
      .col-sm-3.col-sm-push-2.text-center
        .clearfix
        br
        #qrcode
          //- img(src=shareCodeBase64, style="width: 200px; height: 200px;")
        .clearfix
        br
        p: i &nbsp;扫一扫，在手机上查看！
      .col-sm-6.col-sm-push-2
        h3.text-center 分享名片 &nbsp;
          i.fa.fa-send-o
        br
        form
          .form-group
            label.sr-only(for="sharing")
            textarea.form-control(title="编辑分享内容", rows="5").
              我在微名片上制作了一张电子名片，欢迎小伙伴们来围观！
          .pull-right
            ul.list-inline
              li
                | 分享到：
              li
                button.btn.btn-default.disabled QQ空间&nbsp;
                  i.fa.fa-star.text-warning
              li
                button.btn.btn-default.disabled 微博&nbsp;
                  i.fa.fa-weibo.text-danger
              //- li
                button.btn.btn-default.disabled 微信&nbsp;
                  i.fa.fa-weixin.text-success
              //- li
                button.btn.btn-link.disabled
                  i.fa.fa-ellipsis-h.text-muted
